package com.fast.common.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fast.common.service.impl.FastWrapper;

import java.util.List;
import java.util.Map;

/**
 * Class IBaseService
 *
 * @Auther: lhy
 * @Date: 2021/11/19 9:56
 * @Mail: 190643201@qq.com
 */
public interface IBaseService<T> extends IService<T>{

    FastWrapper<T> select(String... column);

    String getTableName();

    IBaseService<T> setForeignKey(String foreignKey);

    String getForeign();

    IBaseService<T> setLeft();

    IBaseService<T> setRight();

    String getJoin();


    IBaseService<T> with(IBaseService<?> baseService, String key);

    List<Map<String, Object>> listMap();

    IPage<Map<String, Object>> pageMap();

    Map<String, Object> find();

    IBaseService<?> setKey(String key);

    String getKey();

    void delete();

    <P> T add(P param);

    <P>void replace(P param);
}
